package com.example.socialmediaplatform.model;

import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List;

public interface MessageRepository extends JpaRepository<Message, Long> {
    List<Message> findByFromUserAndToUserOrderByCreatedAtAsc(String fromUser, String toUser);
    List<Message> findByToUserAndReadedFalseOrderByCreatedAtDesc(String toUser);
} 
